//
//  YCStudyDriveStrategyViewController.m
//  YCSchool
//
//  Created by Kylin on 16/5/12.
//  Copyright © 2016年 yanglinxia. All rights reserved.
//

#import "YCStudyDriveStrategyViewController.h"

@interface YCStudyDriveStrategyViewController ()
/**titleArray*/
@property(nonatomic,strong)NSArray *titleArray;
@end

static NSString *const strategyCell = @"strategyCell";
@implementation YCStudyDriveStrategyViewController

- (NSArray *)titleArray{
    if (!_titleArray) {
        _titleArray =@[@"考试中如何节省时间",
                       @"如何避免重复错题",
                       @"如何快速记忆",
                       @"考试时间合理安排"];
        
    }
    
    return _titleArray;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"学车攻略";
    self.tableView.rowHeight = 48;
    [self yc_addBackBarButtonItem];
}

#pragma mark- TableViewDataSource

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return self.titleArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:strategyCell];
    if (cell == nil) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strategyCell];
    }
    cell.textLabel.text = _titleArray[indexPath.row];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    cell.textLabel.font = [UIFont systemFontOfSize:15];
    cell.textLabel.textColor = [UIColor darkGrayColor];
    return cell;
}
@end
